package com.carkeeper.user.service;

import com.carkeeper.entity.Result;
import com.carkeeper.user.pojo.Department;
import com.github.pagehelper.Page;

import java.util.List;
import java.util.Map;

public interface DepartmentService {
    /**
     * 查询全部数据
     * @return
     */
   public List<Department> findAll();

    /***
     * 新增数据
     * @param department
     * @return
     */
   public void add(Department department);

    /**
     * 根据id查询
     * @param id
     * @return
     */
   public Department findById(Integer id);

    /***
     * 修改数据
     * @param department
     * @return
     */
  public  void update(Department department);
    /***
     * 根据ID删除部门数据(逻辑删除)
     * @param id
     * @return
     */
   public Result deleteById(Integer id);
    /***
     * 分页查询
     * @param page
     * @param size
     * @return
     */
    Page<Department> findPage(int page, int size);

    /***
     * 多条件分页查询
     * @param searchMap
     * @param page
     * @param size
     * @return
     */
    Page<Department> findPage(Map<String, Object> searchMap, int page, int size);



}
